// Created by Windward Studios - no copyright is claimed. This code can be used in
// any manner by anyone for any reason. There is no copyright of any kind on it. You may
// use it in commercial products. You may change it without sharing those changes.
// We ask that you keep the "created by Windward Studios" in a comment at the top.

using System;

namespace net.windward.utils.ado
{
	/// <summary>
	/// An instance of a database running on a computer.
	/// </summary>
	public interface IWrServer : IComparable
	{
		/// <summary>
		/// The name of the server.
		/// </summary>
		string Name
		{
			get;
		}

		/// <summary>
		/// Create a database object.
		/// </summary>
		/// <param name="database">The name of the database.</param>
		IWrDatabase CreateDatabase(string database);

		/// <summary>
		/// All databases on this server. If a provider does not have the concept of databases (Oracle)
		/// it will always return 1 database.
		/// </summary>
		/// <param name="credentials">The user credentials to access the database.</param>
		/// <returns>All databases on this server.</returns>
		IWrDatabase[] GetDatabases(WrCredentials credentials);

		/// <summary>
		/// All databases on this server. If a provider does not have the concept of databases (Oracle)
		/// it will always return 1 database.
		/// </summary>
		/// <param name="connStr">The connection string to access the database.</param>
		/// <returns>All databases on this server.</returns>
		IWrDatabase[] GetDatabases(string connStr);
	}
}
